package io;

import java.io.*;
import java.util.Scanner;

public class PweDemo {
    public static void main(String[] args) throws FileNotFoundException {
        FileOutputStream sis=new FileOutputStream("dd.TXT");
        OutputStreamWriter sos=new OutputStreamWriter(sis);
        BufferedWriter ses=new BufferedWriter(sos);
        PrintWriter sws=new PrintWriter(ses,true);
        System.out.println("pleas写出数据：");
        Scanner scan=new Scanner(System.in);
        while(true){
            String line= scan.nextLine();
            if("exit".equals(line)){
                break;
            }
            sws.println(line);
        }
        sws.close();
    }
}
